<template>
  <Layout class="nav">
    <van-nav-bar title="三鑫补货系统"/>
    <router-link to="/item">
      <Tab name="补货查询" type="setting"/>
    </router-link>
    <Tab name="修改密码" type="form"/>
    <Tab name="退出登录" type="delete" @click.native="onLogout"/>
  </Layout>
</template>

<script lang="ts">
  import Vue from "vue";
  import {Component} from "vue-property-decorator";
  import Tab from "@/components/Tab.vue";
  import DownNav from "@/components/DownNav.vue";
  import Layout from "@/components/Layout.vue";

  @Component({
    components: {Layout, DownNav, Tab}
  })
  export default class Nav extends Vue {
    onLogout() {
      this.$store.commit("removeUser");
      this.$router.push("/login");
    }
  }
</script>

<style lang="scss" scoped>
  .nav {
    height: 100%;
    font-size: 18px;
    background: #f3f3f3;

    .van-nav-bar {
      margin-bottom: 16px;
    }

    ::v-deep.header {
      margin-bottom: 40px;
    }

    a {
      color: inherit;
    }

    ::v-deep.van-nav-bar {
      background: rgb(2, 101, 203);
    }

    ::v-deep .van-icon {
      color: white;
    }

    ::v-deep .van-nav-bar__left {
      fill: white;
    }

    ::v-deep .van-nav-bar__text {
      color: white;
    }

    ::v-deep .van-nav-bar__title {
      color: white;
    }
  }
</style>